package com.hzy.oms.domain.vo;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;
import java.util.Date;

import java.io.Serializable;
import java.util.List;

/**
 * 订单管理视图对象 oms_order
 *
 * @author zengxin
 * @date 2023-10-18
 */
@Data
@ExcelIgnoreUnannotated
public class OrderInfoVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id
     */
    @ExcelProperty(value = "订单id")
    private Long id;

    /**
     * 订单编号
     */
    @ExcelProperty(value = "订单编号")
    private String orderSn;

    /**
     * 支付id
     */
    @ExcelProperty(value = "支付id")
    private Long payId;

    /**
     * 会员id
     */
    @ExcelProperty(value = "会员id")
    private Long memberId;

    /**
     * 用户帐号
     */
    @ExcelProperty(value = "用户帐号")
    private String memberUsername;

    /**
     * 订单总金额
     */
    @ExcelProperty(value = "订单总金额")
    private BigDecimal totalAmount;

    /**
     * 采购价
     */
    @ExcelProperty(value = "采购价")
    private BigDecimal purchasePrice;

    /**
     * 应付金额
     */
    @ExcelProperty(value = "应付金额")
    private BigDecimal payAmount;

    /**
     * 运费金额
     */
    @ExcelProperty(value = "运费金额")
    private BigDecimal freightAmount;

    /**
     * 支付方式
     */
    @ExcelProperty(value = "支付方式", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "oms_pay_type")
    private Integer payType;

    /**
     * 订单状态
     */
    @ExcelProperty(value = "订单状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "oms_order_status")
    private Integer status;

    /**
     * 退款状态
     */
    @ExcelProperty(value = "退款状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "oms_order_status")
    private Integer aftersaleStatus;

    /**
     * 物流公司
     */
    @ExcelProperty(value = "物流公司")
    private String deliveryCompany;

    /**
     * 物流单号
     */
    @ExcelProperty(value = "物流单号")
    private String deliverySn;

    /**
     * 自动确认时间（天）
     */
    @ExcelProperty(value = "自动确认时间", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "天=")
    private Integer autoConfirmDay;

    /**
     * 收货人姓名
     */
    @ExcelProperty(value = "收货人姓名")
    private String receiverName;

    /**
     * 收货人电话
     */
    @ExcelProperty(value = "收货人电话")
    private String receiverPhone;

    /**
     * 收货人邮编
     */
    @ExcelProperty(value = "收货人邮编")
    private String receiverPostCode;

    /**
     * 省份/直辖市
     */
    @ExcelProperty(value = "省份/直辖市")
    private String receiverProvince;

    /**
     * 城市
     */
    @ExcelProperty(value = "城市")
    private String receiverCity;

    /**
     * 区
     */
    @ExcelProperty(value = "区")
    private String receiverDistrict;

    /**
     * 省份/直辖市id
     */
    @ExcelProperty(value = "省份/直辖市id")
    private Long receiverProvinceId;

    /**
     * 城市id
     */
    @ExcelProperty(value = "城市id")
    private Long receiverCityId;

    /**
     * 区id
     */
    @ExcelProperty(value = "区id")
    private Long receiverDistrictId;

    /**
     * 详细地址
     */
    @ExcelProperty(value = "详细地址")
    private String receiverDetailAddress;

    /**
     * 订单备注
     */
    @ExcelProperty(value = "订单备注")
    private String note;

    /**
     * 商家备注
     */
    @ExcelProperty(value = "商家备注")
    private String merchantNote;

    /**
     * 确认收货状态：0->未确认；1->已确认
     */
    @ExcelProperty(value = "确认收货状态：0->未确认；1->已确认", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "oms_order_status")
    private Integer confirmStatus;

    /**
     * 删除状态：0->未删除；1->已删除
     */
    @ExcelProperty(value = "删除状态：0->未删除；1->已删除", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_common_status")
    private Integer deleteStatus;

    /**
     * 支付时间
     */
    @ExcelProperty(value = "支付时间")
    private Date paymentTime;

    /**
     * 发货时间
     */
    @ExcelProperty(value = "发货时间")
    private Date deliveryTime;

    /**
     * 确认收货时间
     */
    @ExcelProperty(value = "确认收货时间")
    private Date receiveTime;

    /**
     * 创建人
     */
    @ExcelProperty(value = "创建人")
    private Long createBy;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改人
     */
    @ExcelProperty(value = "修改人")
    private Long updateBy;

    /**
     * 修改时间
     */
    @ExcelProperty(value = "修改时间")
    private Date updateTime;

    private List<OrderItemVo> orderItemList;

    //支付倒计时
    private Long timeToPay;
}
